package main

import (
	"fmt"
	"subtitleAnalyser/controller"
)

func main() {
	filePath := "./subtitle.srt"
	subtitles, errors := controller.Analyser(filePath)

	for i := range subtitles {
		fmt.Println(subtitles[i])
	}

	for i := range errors {
		fmt.Println(errors[i])
	}

	time := 2000
	subtitles, errors = controller.Pan(time, subtitles)

	for i := range subtitles {
		fmt.Println(subtitles[i])
	}

	for i := range errors {
		fmt.Println(errors[i])
	}

	savePath := "./export.srt"
	result, err := controller.Export(savePath, subtitles)
	fmt.Print(result)
	fmt.Print(err)
}